package com.ygqh.baby.service;

import com.ygqh.baby.ao.Message;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.ao.ReturnReasonType;
import com.ygqh.baby.model.OrderInfo4ReturnOff;
import com.ygqh.baby.model.YgReturnInfoModel;
import com.ygqh.baby.model.YgReturnOrderInfoModel;
import com.ygqh.baby.po.YgReturnOrderOffLine;

import java.util.Date;
import java.util.List;

public interface YgReturnOrderOffLineService {

	List<YgReturnOrderOffLine> find();

	int findCount();

	YgReturnOrderOffLine findById(Long id);

	int deleteSoft(Long[] ids);

	int deleteSoft(Long id);

	int save(YgReturnOrderOffLine ygReturnOrderOffLine);

	int update(YgReturnOrderOffLine ygReturnOrderOffLine);

	int saveOrUpdate(YgReturnOrderOffLine ygReturnOrderOffLine);

	ResultSet<YgReturnOrderOffLine> search(QueryInfo queryInfo, Long orderId, Date startDate, Date endDate,
										   String expressCode, String q);

	/**
	 * 保存退货单
	 * 
	 * @param infoModel
	 * @param returnReason
	 * @param imgPaths
	 * @param info
	 * @param userId
	 * @param handler
	 * @return
	 */
	Message saveReturnOrder(YgReturnInfoModel infoModel, String returnReason, String imgPaths, YgReturnInfoModel info,
							Long userId, String handler);

	List<YgReturnOrderOffLine> findDetailByOrderId(Long orderId);

	/**
	 * 获取订单信息用于下线退货
	 * 
	 * @Title: findOrderInfoToOffReturn
	 * @param orderId
	 *            入参
	 * @return void 返回类型
	 * @author （guohao）
	 * @throws
	 * @date 2017年7月3日 下午5:49:15
	 * @version V1.0
	 */
	OrderInfo4ReturnOff findOrderInfoToOffReturn(Long orderId);

	YgReturnOrderInfoModel findReturnOrderInfo(String returnCode, Long userId);

	Message saveReturnOrderV2(YgReturnInfoModel infoModel, ReturnReasonType returnReasonType, String returnReason,
							  String imgPaths, Long userId, String trueName);

}
